home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Apple Shared Library Manager / ASLM Examples / Sample Apps / PSample / Sources / SampleLibrary.p < prev    next >
Encoding:
Text File  |  1996-11-19  |  1.1 KB  |  48 lines  |  [TEXT/MPS ]

  1. {
  2.     File:        SampleLibrary.h
  3.  
  4.     Contains:    Interface for everything that the PSampleLibrary exports including
  5.                 the functions of the traffic light function set.
  6.  
  7.     Copyright:    © 1993 by Apple Computer, Inc., all rights reserved.
  8.  
  9. }
  10.  
  11. UNIT SampleLibrary;
  12.  
  13. INTERFACE
  14.  
  15. USES
  16.     MemTypes, QuickDraw, OSIntf, ToolIntf, PackIntf, Traps, LibraryManager,
  17.     LibraryManagerUtilities;
  18.     
  19.     TYPE
  20.         TTrafficLight     = LongIntPtr;        { our instance of TrafficLight class }
  21.  
  22.     CONST
  23.         kTrafficLightLibID        = 'slm:samp$PTrafficLight';
  24.         kTrafficLightFunctionSet= 'slm:samp$PTrafficLightFunctionSet,1.1';
  25.         
  26.         rWindow        = 128;                    {application's window}
  27.         rStopRect    = 128;                    {rectangle for Stop light}
  28.         rGoRect        = 129;                    {rectangle for Go light}
  29.     
  30.         mLight        = 131;                    {Light menu}
  31.         iStop        = 1;
  32.         iGo            = 2;
  33.  
  34.     { PROCEDURES AND FUNCTIONS PROTOTYPES }
  35.  
  36.     FUNCTION     NewTrafficLight : OSErr;
  37.     PROCEDURE     FreeTrafficLight;
  38.     FUNCTION     GetLightState : BOOLEAN;
  39.     PROCEDURE     SetLightState( newState : BOOLEAN ); 
  40.     PROCEDURE     DrawLight;
  41.     PROCEDURE     AdjustTrafficLightMenus( active: BOOLEAN );
  42.     PROCEDURE     DoTrafficLightMenuCommand( menuItem: INTEGER );
  43.  
  44. IMPLEMENTATION
  45.  
  46. {$I SampleLibrary.inc.p}
  47.  
  48. END.